﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace DARE
{
    public class CBookData: CWidgetData
    {
        public bool displayNumPage;
        public Vector2 itemsPosition;
        public Vector2 itemsSize;
        public Color numPageColor;
        public CHorizontalSelectorData pages;
        public string title;

        public override void FillDataStructure(CWidget wid)
        {
            CBook w = wid as CBook;
            base.FillDataStructure(wid);

            displayNumPage = w.DisplayNumPage;
            itemsPosition = w.ItemsPosition;
            itemsSize = w.ItemsSize;
            numPageColor = w.NumPageColor;
            pages = new CHorizontalSelectorData();
            pages.FillDataStructure(w.Pages);
            title = w.Title;
        }

        public override void FillFromDataStructure(ref CWidget wid, CHUDSystem hud)
        {
            base.FillFromDataStructure(ref wid, hud);
            (wid as CBook).DisplayNumPage = displayNumPage;
            (wid as CBook).ItemsPosition = itemsPosition;
            (wid as CBook).ItemsSize = itemsSize;
            (wid as CBook).NumPageColor = numPageColor;
            (wid as CBook).Title = title;
        }
    }
}
